<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib prefix="sys" uri="/WEB-INF/tld/sys.tld" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>逾期催收-实付明细</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="sqPanel" style="margin-bottom: 0;">
        <div class="sqPanel_body">
            <div id="ligergrid1" class="sq-grid"></div>
        </div>   
    </div>
</div>



<script type="text/javascript">
    var grid = null, form = null;
    var maxday=0;
    var callback=null;
    $(function () {
        var payDetailId = "${payDetailId}";
        var paySchId="${paySchId}";
        var payPd="${payPd}";
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/risk/overdueCollect/initOverdueCapFundVfDtlList.do',
            parms:{
            	payDetailId:payDetailId,
            	paySchId:paySchId,
            	payPd:payPd
            },
            method: 'get',
            columns: [
                {display: '应收类型', name: 'feeTypeCd', width: 140, align: 'center', enabledSort: false,
                	render:function(rowdata){
	                    if(rowdata.payPd&&rowdata.payPd!=0){
	                    	return "第"+rowdata.payPd + "期"+rowdata.feeTypCdNm;
	                    }else{
	                    	return rowdata.feeTypCdNm;
	                    }     	
                    }
                },
                {
                    display: '实收金额', name: 'vfAmt', width: 140, align: 'center', enabledSort: false,
                    render: function (rowdata, index, value) {
                        return '&yen;' + FormatMoney(rowdata.vfAmt / 100);
                    }
                },
                {display: '实际到账日', name: 'acceptActualDate', width: 140, align: 'center', enabledSort: false,render:renderDate},
                {display: '核销时间', name: 'vfDt', width: 140, align: 'center', enabledSort: false,render:renderTime},
                {display: '认款人', name: 'identifyOperatorNm', width: 140, align: 'center', enabledSort: false},
                {
                	display: '资金编号', name: 'code', width: 160 ,
                	render:function(rowdata,index,value){
                    	return '<a class="sq-button-hasicon" style="cursor: pointer;" onclick="qyFundDecom('+ rowdata.id +','+rowdata.fundId+');">'+rowdata.code+'</a>' ;
            		}
                },
                {
                	display: '分解单号', name: 'vfNo', width: 160 ,
                	render:function(rowdata,index,value){
                    	return '<a class="sq-button-hasicon" style="cursor: pointer;" onclick="qyFundDecom(' + rowdata.vfId + ','+rowdata.fundId+');">'+rowdata.vfNo+'</a>' ;
            		}
                }
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            allowUnSelectRow: true,
            alternatingRow: false,
        });
        grid.setHeight(100);
        $("#pageloading").hide();
        callback = function () {
            grid.reload();
        };
    });

    //格式化日期
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
        }
        return dateStr;
    }
  	//格式化时间
    function renderTime(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }
  	//查询资金分解详情
    function qyFundDecom(vfId,fundId){
    	Add_navTab('toDecomDtlPage_'+vfId, '资金分解详情', '<%=path%>/capital/capFund/toDecomDtlPage.do?vfId='+vfId+"&fundId="+fundId, callback);
    }
</script>
</body>
</html>
